package cn.iocoder.yudao.module.dr.controller.admin.sourceapply.vo;

import cn.iocoder.yudao.module.dr.dal.dataobject.sourceapplydetail.SourceApplyDetailDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 资源申请新增/修改 Request VO")
@Data
public class SourceApplySaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14781")
    private Long id;

    @Schema(description = "申请编号")
    private String applyCode;

    @Schema(description = "申请人", example = "27395")
    private Long applyUserId;

    @Schema(description = "联系方式")
    private String phone;

    @NotNull(message = "使用期限不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @Schema(description = "使用期限")
    private LocalDateTime useEndTime;

    @Schema(description = "使用理由")
    private String applyReson;

    @Schema(description = "附件")
    private String file;

    @Schema(description = "申请状态")
    private String applyStatus;

    @Schema(description = "申请的资源列表")
    private List<SourceApplyDetailDO> sourceApplyDetails;

    @Schema(description = "操作标识", example = "save 暂存, submit 提交")
    private String operateFlag;

}